<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>Cart2</title>
<body>
request.setCharacterEncoding("utf-8");
String goodsName[]=request.getParameterValues("choice");
if(goodsName!=null) {
for(int k=0;k<goodsName.length;k++){
session.removeAttribute(goodsName[k]);
}
}
%>
<P>购物车：<BR>
<FORM action="" method=post name=form>
<% Enumeration enumGoods=session.getAttributeNames();
while(enumGoods.hasMoreElements()) {
String key=(String)enumGoods.nextElement();
String goods=(String)session.getAttribute(key);}%>
<Input type="submit" value="删除" name="delete">
<Input type="reset" value="全部重写" name="reset">
</FORM>

</body>
</html>